[Hudi-3376] Add an option to skip under deletion files for HoodieMetadataTableValidator#4994
Merged
yihua merged 5 commits intoapache:masterfrom Mar 17, 2022
Merged
Conversation
Contributor
Author
|
@hudi-bot run azure |
Contributor
Author
|
@hudi-bot run azure |
Contributor
Author
|
Azure Passed. Hi @yihua really appreciate it if you could help me review this patch :) |
yihua
reviewed
Mar 12, 2022
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java
Outdated
Show resolved
Hide resolved
yihua
reviewed
Mar 13, 2022
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java
Outdated
Show resolved
Hide resolved
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java
Outdated
Show resolved
Hide resolved
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java
Outdated
Show resolved
Hide resolved
| } catch (HoodieIOException ex) { | ||
|
|
||
| if (ex.getIOException() instanceof FileNotFoundException) { | ||
| // cleaner instant could be deleted by archive and FileNotFoundException could be threw during getInstantDetails function |
Contributor
There was a problem hiding this comment.
Inflight cleaning instants shouldn't be archived. Is this considering the inflight cleaning instant deleted due to failed cleaning?
Contributor
Author
There was a problem hiding this comment.
Actually no need to check FileNotFoundException here. removed.
| .collect(Collectors.toList()); | ||
| HoodieMetadataValidationContext fsBasedContext, | ||
| String partitionPath, | ||
| List<String> baseFilesUnderDeletion) { |
Contributor
There was a problem hiding this comment.
similar here for variable naming.
| LOG.info("Validation of getLatestFileSlices succeeded for partition " + partitionPath); | ||
| } | ||
|
|
||
| private List<FileSlice> filterFileSliceBasedOnUnderDeletionFiles(List<FileSlice> sortedLatestFileSliceList, List<String> baseFilesUnderDeletion) { |
Contributor
There was a problem hiding this comment.
Could baseFilesUnderDeletion be a Set<String> to speed up lookup?
Contributor
Author
There was a problem hiding this comment.
Make sense! changed. Thanks a lot for your reviewing!
Contributor
Author
|
@hudi-bot run azure |
vingov
pushed a commit
to vingov/hudi
that referenced
this pull request
Apr 3, 2022
…dataTableValidator (apache#4994) Co-authored-by: yuezhang <yuezhang@freewheel.tv>
stayrascal
pushed a commit
to stayrascal/hudi
that referenced
this pull request
Apr 12, 2022
…dataTableValidator (apache#4994) Co-authored-by: yuezhang <yuezhang@freewheel.tv>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/HUDI-3376
What is the purpose of the pull request
add an option named
--skip-data-files-for-cleaningwhich will skip to compare the data files which are under deletion by cleanerBrief change log
When enabled, HoodieMetadataTableValidator will read the clean plan for pending cleaning action and get under deletion data files. Then hoodie will skip to compare these files.
This patch is tested on our local env.
There 're pending cleaning actions during performing HoodieMetadataTableValidator.
Before this patch validator failed with
After this patch
Verify this pull request
(Please pick either of the following options)
This pull request is a trivial rework / code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green
Necessary doc changes done or have another open PR
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.